Repository navigation
feat: cortex.py library — ledger entry with the results-index hash (results-library 5b) - #85
Merged
Merged
Conversation
…esults-library 5b) New entry kind `library` (decision 65, decide-and-flag): facts read from a PyAutoFit results index only — sha256 equal to autofit.export.index_hash and the state counts; written only by the verb, never `log --kind`; never a result/lesson or ## Now. REFERENCE, AGENTS and tests (14 new). Refs #84 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Results-library phase 5b (closes #84). The Cortex ledger can now record which results a library or release was built from.
cortex.py library <project> <index_dir>appends one fact-only entry, read from a PyAutoFit results index:The hash is the same sha256
autofit.export.index_hashcomputes, and thataf.export.packagewrites into a release's README. So a ledger line, a package and an index can be tied together. Cortex computes the hash from the JSON, with no autofit import.Decision flagged for your ruling — decision 65 (new entry kind
library)index.jsonandrecords/*.json, never inferred. It is never aresult/lessonand never touches## Nowor## Runs.log --kindno longer offerslibrary; hand-typing it exits 2.--namedefaults to the index folder's name, or its parent's for.autofit_index;index.json, so they agree with the hash, and a non-schema-1index.jsonis refused;API Changes
cortex.py library <project> <index_dir> [--name NAME] [--dry-run] [--today].library.log --kindchoices are unchanged except thatlibraryis excluded.Test Plan
tests/test_library.py: 14 new tests. One builds a real index withautofit.results.ResultsIndexand checks the hash equalsautofit.export.index_hash.cortex.py check: OK. Dashboard--check: current (no ledger changed).Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code